% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/frs_clean.R
\name{frs_clean}
\alias{frs_clean}
\title{Clean Facility Registry Service (FRS) dataset when updating copy for use in EJAM}
\usage{
frs_clean(
  frs,
  usefulcolumns = c("LATITUDE83", "LONGITUDE83", "REGISTRY_ID", "PRIMARY_NAME",
    "NAICS_CODES", "SIC_CODES", "PGM_SYS_ACRNMS")
)
}
\arguments{
\item{frs}{data.table that is the output of frs_read()}

\item{usefulcolumns}{optional, drops all columns except those in this vector of character colnames}
}
\value{
data.table with columns as defined by usefulcolumns parameter like REGISTRY_ID, and some renamed
to for example lat, lon, NAICS, SIC
}
\description{
Clean Facility Registry Service (FRS) dataset when updating copy for use in EJAM
}
\details{
Used by \code{\link[=frs_get]{frs_get()}}
This renames some columns (lat, lon, NAICS are new names)
and it drops rows lacking lat/lon location info in the LATITUDE83 or LONGITUDE83 columns
}
\seealso{
\code{\link[=frs_update_datasets]{frs_update_datasets()}}
}
